package com.kaibes.module.security.entity;


import javax.validation.constraints.Min;

import com.kaibes.core.base.annotation.Description;

import lombok.Data;

/**
CREATE TABLE `authority` (
  `id` integer NOT NULL AUTO_INCREMENT,
  `name` varchar(128) NOT NULL,
  `role_id` smallint unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `role_name` (`role_id`, `name`),
  CONSTRAINT `power_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 */
@Data
public class Authority {
	
	@Description("ID")
    private Integer id;
    @Description("角色ID")
    @Min(value = 1, message = "id不能小于1")
    private Integer roleId;
    @Description("权限名称，类名_方法名")
    private String name;
	
}
